package com.modules.service.sys.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.common.constant.CommonConstant;
import com.common.vo.Result;
import com.modules.dao.sys.LogDao;
import com.modules.dto.sys.req.LogEntityReq;
import com.modules.dto.sys.resp.UserEntityResp;
import com.modules.entity.sys.LogEntity;
import com.modules.service.sys.LogService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * service日志
 *
 * @author yyq
 */
@Service
public class LogServiceImp extends ServiceImpl<LogDao, LogEntity> implements LogService{


    /**
     * 分页查询
     * @return
     */
    @Override
    public Result selectPage(LogEntityReq entity) {
        entity.setDelFlag(CommonConstant.ZERO);
        List<UserEntityResp> list = baseMapper.select(entity);
        Integer count = baseMapper.selectCount(entity);
        return Result.page(list, Long.valueOf(count));
    }


}
